<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<html>
<head>
    <script type="text/javascript">
        var InfoUrl="contact/contactInfo.do";
        $(document).ready(function () {
            $('#contact-fm').form('syncLoad', InfoUrl);
        });
        function back(url) {
            $.get(url, {}, function(data) {
                $("#center").empty();
                $("#center").html(data);
                $.parser.parse($("#center"));
            });
        }
        function upContact() {
            $('#contact-fm').form('submit', {
                url: "contact/editContact.do",
                onSubmit: function () {
                    return $(this).form('validate');
                },
                success: function (result) {
                    var result = eval('(' + result + ')');
                    if (result.retCode == '0000') {
                        back("contact/index.do");
                    } else {
                        $.messager.show({
                            title: 'Error',
                            msg: result.retMsg
                        });
                    }
                }
            });
        }
        function editContact(url) {
            $.get(url, {}, function(data) {
                $("#center").empty();
                $("#center").html(data);
                $.parser.parse($("#center"));
            });
        }
    </script>
</head>
<body>
<div class="linkbar"><a>联系方式管理</a></div>
<div id="contact-add">
    <form id="contact-fm" method="post" novalidate>
        <br>
        <br>
        <br>
        <div class="fitem">
            <label>商务合作联系方式：</label> <input name="telphone"
                                            style="width:250px;"
                                            class="easyui-validatebox"
                                            required="true"/>
        </div>
        <br>
        <br>
        <br>
        <div class="fitem">
            <label>简历投递邮箱：</label> <input name="email"
                                          style="width:250px;"
                                          class="easyui-validatebox"
                                          required="true"/>
        </div>
        <br>
        <br>
        <br>
    </form>
</div>
<div id="dlg-buttons">
    <a href="#" class="easyui-linkbutton" iconCls="icon-ok"
       onclick="upContact()">保存</a> <a href="#" class="easyui-linkbutton"
                                         iconCls="icon-cancel" onclick="back('contact/index.do')">返回</a>
</div>
</body>
</html>